Skip to content

Fix BMConfigParser.setTemp() broken in a5773999#1928

Merged
g1itch merged 5 commits intoBitmessage:v0.6from
g1itch:config-revert
Feb 22, 2022
Merged

Fix BMConfigParser.setTemp() broken in a5773999#1928
g1itch merged 5 commits intoBitmessage:v0.6from
g1itch:config-revert

Conversation

@g1itch
Copy link
Copy Markdown
Collaborator

@g1itch g1itch commented Feb 16, 2022

Hi!

I reverted some changes in bmconfigparser from previous commits. Particularly those, breaking the logic of setTemp(), which is used in proxyconfig plugin and for network restart after changing the proxy type.

Done some formatting for PEP8. In this regard, the question arose: what is hidden addresses and why it's only for python3?

@g1itch
Copy link
Copy Markdown
Collaborator Author

g1itch commented Feb 16, 2022

Another interesting failure in buildbot: https://buildbot.bitmessage.org/#/builders/25/builds/3740

@PeterSurda
Copy link
Copy Markdown
Member

Another interesting failure in buildbot: https://buildbot.bitmessage.org/#/builders/25/builds/3740

That's simply because the test isn't deterministic, it can randomly happen. One possible fix is to test the API with the mock backend, we can try some time later.

@g1itch
Copy link
Copy Markdown
Collaborator Author

g1itch commented Feb 17, 2022

Another interesting failure in buildbot: https://buildbot.bitmessage.org/#/builders/25/builds/3740

That's simply because the test isn't deterministic, it can randomly happen. One possible fix is to test the API with the mock backend, we can try some time later.

I know. You didn't believe me when I said that code in #1864 is a garbage...
No need for another mock, I already started reverting it in #1900.

@g1itch
Copy link
Copy Markdown
Collaborator Author

g1itch commented Feb 17, 2022

What about hidden addresses? I want to rewrite this part as well: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/bmconfigparser.py#L106

@PeterSurda
Copy link
Copy Markdown
Member

hidden doesn't appear to be used anywhere and probably won't, so can be deleted.

@g1itch g1itch requested a review from PeterSurda February 18, 2022 16:18
Copy link
Copy Markdown
Member

@PeterSurda PeterSurda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash before merging.

@PeterSurda
Copy link
Copy Markdown
Member

Do you need anything else from me before merging this?

also empty _temp in BMConfigParser._reset().
  - remove meaningless comments, rename strange args, fix line lengths,
  - revert BMConfigParser.addresses() entanglement,
  - revert BMConfigParser read_file -> readfp alias.
  - for PEP8 compatibility, rewrite copypasted docstring,
  - remove unused configfile slot, move pylint hint,
  - define TestConfig.setUp(), creating BMConfigParser obj,
@g1itch
Copy link
Copy Markdown
Collaborator Author

g1itch commented Feb 21, 2022

Sorry, I got distracted a bit. Is this squashed enough now?

@g1itch g1itch merged commit e778ee9 into Bitmessage:v0.6 Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants